<?php

namespace IMooc;

class ObjectHandle
{
    protected array $array = [];

    function __set($key, $value)
    {
        var_dump(__METHOD__);
        $this->array[$key] = $value;
    }

    function __get($key)
    {
        var_dump(__METHOD__);
        return $this->array[$key];
    }

    function __call(string $func, array $params)
    {
        var_dump($func, ...$params);
    }

    static function __callStatic(string $func, array $params)
    {
        var_dump($func, ...$params);
    }

    function __toString()
    {
        return __CLASS__;
    }

    function __invoke(): string
    {
        return 'invoke';
    }
}